<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="TwitterAPI,com.dborisenko.api.twitter.TwitterAPI,POST_TYPE_ASYNC,POST_TYPE_ASYNC_STATIC,POST_TYPE_NORMAL,PRIORITY_HIGH,PRIORITY_HIGHEST,PRIORITY_LOW,PRIORITY_LOWEST,PRIORITY_NORMAL,connection,post" name="keywords">
<title>com.dborisenko.api.twitter.TwitterAPI</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'TwitterAPI - API Documentation';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?com/dborisenko/api/twitter/TwitterAPI.html&amp;com/dborisenko/api/twitter/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;TwitterAPI</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class TwitterAPI"); titleBar_setSubNav(true,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.dborisenko.api.twitter</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class TwitterAPI</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">TwitterAPI <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
</table>
<p></p>
  Twitter API class.
  <br/><br/>
  Example:<br/>
  <code>
  var twitterApi:TwitterAPI = new TwitterAPI();<br/>
  twitterApi.connection.setAccessToken(key, secret);<br/>
  var op:TwitterOperation = new VerifyCredentials();<br/>
  var handler:Function = function (event:TwitterEvent):void<br/>
  {<br/>
          op.removeEventListener(TwitterEvent.COMPLETE, handler);<br/>
          if (event.success)<br/>
          {<br/>
                  trace("Credentials verified. User is: " + TwitterUser(event.data).screenName);<br/>
          }<br/>
          else<br/>
          {<br/>
                  trace("Verification error. Twitter error message: " + event.data);<br/>
          }<br/>
  };<br/>
  op.addEventListener(TwitterEvent.COMPLETE, handler);<br/>
  twitterApi.post(op, TwitterAPI.POST_TYPE_ASYNC_STATIC, TwitterAPI.PRIORITY_HIGHEST);<br/>
  </code>
  
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#connection">connection</a> : <a href="oauth/OAuthTwitterConnection.html">OAuthTwitterConnection</a>
<div class="summaryTableDescription">[read-only]
   Connection of OAuth authentication to Twitter.</div>
</td><td class="summaryTableOwnerCol">TwitterAPI</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#TwitterAPI()">TwitterAPI</a>()</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">TwitterAPI</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#post()">post</a>(operation:<a href="net/TwitterOperation.html">TwitterOperation</a>, postType:String, priority:int):<a href="net/TwitterOperation.html">TwitterOperation</a>
</div>
<div class="summaryTableDescription">
   Post operation for executing.</div>
</td><td class="summaryTableOwnerCol">TwitterAPI</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#POST_TYPE_ASYNC">POST_TYPE_ASYNC</a> : String = "async"<div class="summaryTableDescription">[static]
   Async post type.</div>
</td><td class="summaryTableOwnerCol">TwitterAPI</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#POST_TYPE_ASYNC_STATIC">POST_TYPE_ASYNC_STATIC</a> : String = "asyncStatic"<div class="summaryTableDescription">[static]
   Async post type.</div>
</td><td class="summaryTableOwnerCol">TwitterAPI</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#POST_TYPE_NORMAL">POST_TYPE_NORMAL</a> : String = "normal"<div class="summaryTableDescription">[static]
   Normal post type.</div>
</td><td class="summaryTableOwnerCol">TwitterAPI</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#PRIORITY_HIGH">PRIORITY_HIGH</a> : int = 7<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">TwitterAPI</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#PRIORITY_HIGHEST">PRIORITY_HIGHEST</a> : int = 9<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">TwitterAPI</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#PRIORITY_LOW">PRIORITY_LOW</a> : int = 3<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">TwitterAPI</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#PRIORITY_LOWEST">PRIORITY_LOWEST</a> : int = 1<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">TwitterAPI</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#PRIORITY_NORMAL">PRIORITY_NORMAL</a> : int = 5<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">TwitterAPI</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="connection"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">connection</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>connection:<a href="oauth/OAuthTwitterConnection.html">OAuthTwitterConnection</a></code>&nbsp;&nbsp;[read-only]<p>
   Connection of OAuth authentication to Twitter.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get connection():<a href="oauth/OAuthTwitterConnection.html">OAuthTwitterConnection</a></code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="TwitterAPI()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">TwitterAPI</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function TwitterAPI()</code>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="post()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">post</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function post(operation:<a href="net/TwitterOperation.html">TwitterOperation</a>, postType:String, priority:int):<a href="net/TwitterOperation.html">TwitterOperation</a></code><p>
   Post operation for executing.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">operation</span>:<a href="net/TwitterOperation.html">TwitterOperation</a></code> &mdash;  Instance of the operation.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">postType</span>:String</code> &mdash;  Post type of the operation. 
         Can be <code>POST_TYPE_NORMAL</code>, <code>POST_TYPE_ASYNC</code> or 
         <code>POST_TYPE_ASYNC_STATIC</code>
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">priority</span>:int</code> &mdash;  Priority of executing of the operation
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="net/TwitterOperation.html">TwitterOperation</a></code> &mdash; 
                            Twitter Operation
   
   
                        
                     </td>
</tr>
</table>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="POST_TYPE_ASYNC"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">POST_TYPE_ASYNC</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const POST_TYPE_ASYNC:String = "async"</code><p>
   Async post type. Put operation in the queue. Execute operation in the queue. 
   Each instance has his own queue of operations.
   </p></div>
<a name="POST_TYPE_ASYNC_STATIC"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">POST_TYPE_ASYNC_STATIC</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const POST_TYPE_ASYNC_STATIC:String = "asyncStatic"</code><p>
   Async post type. Put operation in the queue. Execute operation in the static queue.
   Common static queue of operations.
   </p></div>
<a name="POST_TYPE_NORMAL"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">POST_TYPE_NORMAL</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const POST_TYPE_NORMAL:String = "normal"</code><p>
   Normal post type. Not to put operation in the queue. Execute operation immediately.
   </p></div>
<a name="PRIORITY_HIGH"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">PRIORITY_HIGH</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const PRIORITY_HIGH:int = 7</code>
</div>
<a name="PRIORITY_HIGHEST"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">PRIORITY_HIGHEST</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const PRIORITY_HIGHEST:int = 9</code>
</div>
<a name="PRIORITY_LOW"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">PRIORITY_LOW</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const PRIORITY_LOW:int = 3</code>
</div>
<a name="PRIORITY_LOWEST"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">PRIORITY_LOWEST</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const PRIORITY_LOWEST:int = 1</code>
</div>
<a name="PRIORITY_NORMAL"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">PRIORITY_NORMAL</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const PRIORITY_NORMAL:int = 5</code>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
